package com.zygh.lz.dao.app;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zygh.lz.entity.app.AppMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AppMenuMapper  extends BaseMapper<AppMenu> {

    //查询app角色
    @Select("SELECT * FROM app_menu am LEFT JOIN  role_permission rp ON am.id = rp.permission_id " +
            "WHERE rp.role_id = #{id}")
    List<AppMenu> findAppMenuByRole(int id);

}
